// $Id: NavigatorRoot.java 9 2011-09-08 14:40:10Z huijzer@gmail.com $
package lime.model;

import lime.service.RepositoryService;
import lime.service.SpringApplicationContext;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.model.IWorkbenchAdapter;

public class NavigatorRoot implements IWorkbenchAdapter {

	private RepositoryService repositoryService;
	
	public NavigatorRoot() {
		repositoryService = (RepositoryService) SpringApplicationContext.getBean("repositoryService");
	}
	
	// ========================================
	// IWorkbenchAdapter
	// ========================================
	
	@Override
	public Object[] getChildren(Object o) {
		return repositoryService.getCabinets().toArray();
	}

	@Override
	public ImageDescriptor getImageDescriptor(Object object) {
		return null;
	}

	@Override
	public String getLabel(Object o) {
		return null;
	}

	@Override
	public Object getParent(Object o) {
		return null;
	}

}
